import 'package:flustars/flustars.dart';
import 'package:flutter/cupertino.dart';

class Util {
  static String getImgPath(String name, {String format= 'png'}) {
    return 'assets/images/$name.$format';
  }

  //format  webp,png
  static Widget getAssets(
    String name, {
    String format = 'png',
    double width = 22,
    double height = 22,
  }) {
    return Image.asset(
      'assets/images/$name.$format',
      width: width,
      height: height,
    );
  }

  static String getFileName(String urlPath) {
    if (ObjectUtil.isEmpty(urlPath)) return '';
    List<String> listStr = urlPath.split("/");
    String name = listStr[listStr.length - 1];
    return name;
  }



  
}
